package 设计模式.简单工厂;

public class main {
    /**
     * 一个工厂生成多种产品
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
        factory factory = new factory();
        food food = factory.create("1");
        String eat = food.eat();
        System.out.println(eat);

        food food1 = factory.create("2");
        System.out.println(food1.eat());
    }
}
